<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\card\model;

class DefaultSetting extends \app\BaseModel
{
    protected $name = "longbing_card_default_setting";
    public function settingInfo($dis, $field = "*")
    {
        $data = $this->where($dis)->find();
        if(empty($data)) {
            $dis["my_photo_cover"] = !empty($dis["my_photo_cover"]) ? $dis["my_photo_cover"] : "";
            $dis["share_text"] = !empty($dis["share_text"]) ? $dis["share_text"] : "";
            $this->insert($dis);
        }
        return $this->where($dis)->field($field)->find()->toArray();
    }
    public function settingUpdate($dis, $data)
    {
        $res = $this->where($dis)->update($data);
        return $res;
    }
}

?>